luci-base: tools.widget.NetworkSelect: disallow invalid network names
authorJo-Philipp Wich <[email protected]>
Fri, 6 Nov 2020 23:40:31 +0000 (00:40 +0100)
committerJo-Philipp Wich <[email protected]>
Fri, 6 Nov 2020 23:41:56 +0000 (00:41 +0100)
Fixes: #4523, #4573
Signed-off-by: Jo-Philipp Wich <[email protected]>
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 1de8a08bc3b5ecc160684cac2652c37038173f9e..b97696c1b8e61cbe623b72a57aeb1ceed5c280c1 100644 (file)
@@ -393,6 +393,7 @@ var CBINetworkSelect = form.ListValue.extend({
                        select_placeholder: E('em', _('unspecified')),
                        display_items: this.display_size || this.size || 3,
                        dropdown_items: this.dropdown_size || this.size || 5,
+                       datatype: 'uciname',
                        validate: L.bind(this.validate, this, section_id),
                        create: !this.nocreate,
                        create_markup: '' +